<?php

include '../DB/dbConnection.php';

$result=array();

if ($_POST){
	
	$sql = "INSERT INTO lic_teacher(name, position, gender, doj) VALUES ('".$_POST['TeacherName']."', '".$_POST['TeacherPosition']."', '".$_POST['TeacherGender']."', '".$_POST['TeacherDoj']."')";
	$res = mysqli_query($conn, $sql);

	if($res)
		$result['error']=false;
	else
		$result['error']=true;
}
else
{
	$result['error']=true;
}

$conn->close();	

echo json_encode($result);
?> 